package com.nondo.dean.order.mapper;

import com.nondo.dean.common.mybatis.Table;
import com.nondo.dean.order.domain.TransferDetail;
import com.nondo.dean.order.domain.TransferDetailExample;
import java.util.List;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.DeleteProvider;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.InsertProvider;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Result;
import org.apache.ibatis.annotations.Results;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.SelectProvider;
import org.apache.ibatis.annotations.Update;
import org.apache.ibatis.annotations.UpdateProvider;
import org.apache.ibatis.session.RowBounds;
import org.apache.ibatis.type.JdbcType;

@Table("transfer_detail")
@Mapper
public interface TransferDetailMapper {
    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table transfer_detail
     *
     * @mbg.generated Thu Jun 21 11:26:38 CST 2018
     */
    @SelectProvider(type=TransferDetailSqlProvider.class, method="countByExample")
    long countByExample(TransferDetailExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table transfer_detail
     *
     * @mbg.generated Thu Jun 21 11:26:38 CST 2018
     */
    @DeleteProvider(type=TransferDetailSqlProvider.class, method="deleteByExample")
    int deleteByExample(TransferDetailExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table transfer_detail
     *
     * @mbg.generated Thu Jun 21 11:26:38 CST 2018
     */
    @Delete({
        "delete from transfer_detail",
        "where id = #{id,jdbcType=INTEGER}"
    })
    int deleteByPrimaryKey(Integer id);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table transfer_detail
     *
     * @mbg.generated Thu Jun 21 11:26:38 CST 2018
     */
    @Insert({
        "insert into transfer_detail (id, user_id, ",
        "bankname, remittance_time, ",
        "deal_amount, deal_bankname, ",
        "deal_summary, money_used, ",
        "sap_no, u8_no, user_code, ",
        "user_name, user_address, ",
        "transaction_no, remit_name, ",
        "bank_id, status, ",
        "transaction_mode, transaction_image, ",
        "create_by, create_date, ",
        "update_by, update_date, ",
        "remarks, del_flag)",
        "values (#{id,jdbcType=INTEGER}, #{userId,jdbcType=INTEGER}, ",
        "#{bankname,jdbcType=VARCHAR}, #{remittanceTime,jdbcType=TIMESTAMP}, ",
        "#{dealAmount,jdbcType=DECIMAL}, #{dealBankname,jdbcType=VARCHAR}, ",
        "#{dealSummary,jdbcType=VARCHAR}, #{moneyUsed,jdbcType=INTEGER}, ",
        "#{sapNo,jdbcType=VARCHAR}, #{u8No,jdbcType=VARCHAR}, #{userCode,jdbcType=VARCHAR}, ",
        "#{userName,jdbcType=VARCHAR}, #{userAddress,jdbcType=VARCHAR}, ",
        "#{transactionNo,jdbcType=VARCHAR}, #{remitName,jdbcType=VARCHAR}, ",
        "#{bankId,jdbcType=INTEGER}, #{status,jdbcType=INTEGER}, ",
        "#{transactionMode,jdbcType=INTEGER}, #{transactionImage,jdbcType=VARCHAR}, ",
        "#{createBy,jdbcType=BIGINT}, #{createDate,jdbcType=TIMESTAMP}, ",
        "#{updateBy,jdbcType=BIGINT}, #{updateDate,jdbcType=TIMESTAMP}, ",
        "#{remarks,jdbcType=VARCHAR}, #{delFlag,jdbcType=CHAR})"
    })
    int insert(TransferDetail record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table transfer_detail
     *
     * @mbg.generated Thu Jun 21 11:26:38 CST 2018
     */
    @InsertProvider(type=TransferDetailSqlProvider.class, method="insertSelective")
    int insertSelective(TransferDetail record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table transfer_detail
     *
     * @mbg.generated Thu Jun 21 11:26:38 CST 2018
     */
    @SelectProvider(type=TransferDetailSqlProvider.class, method="selectByExample")
    @Results({
        @Result(column="id", property="id", jdbcType=JdbcType.INTEGER, id=true),
        @Result(column="user_id", property="userId", jdbcType=JdbcType.INTEGER),
        @Result(column="bankname", property="bankname", jdbcType=JdbcType.VARCHAR),
        @Result(column="remittance_time", property="remittanceTime", jdbcType=JdbcType.TIMESTAMP),
        @Result(column="deal_amount", property="dealAmount", jdbcType=JdbcType.DECIMAL),
        @Result(column="deal_bankname", property="dealBankname", jdbcType=JdbcType.VARCHAR),
        @Result(column="deal_summary", property="dealSummary", jdbcType=JdbcType.VARCHAR),
        @Result(column="money_used", property="moneyUsed", jdbcType=JdbcType.INTEGER),
        @Result(column="sap_no", property="sapNo", jdbcType=JdbcType.VARCHAR),
        @Result(column="u8_no", property="u8No", jdbcType=JdbcType.VARCHAR),
        @Result(column="user_code", property="userCode", jdbcType=JdbcType.VARCHAR),
        @Result(column="user_name", property="userName", jdbcType=JdbcType.VARCHAR),
        @Result(column="user_address", property="userAddress", jdbcType=JdbcType.VARCHAR),
        @Result(column="transaction_no", property="transactionNo", jdbcType=JdbcType.VARCHAR),
        @Result(column="remit_name", property="remitName", jdbcType=JdbcType.VARCHAR),
        @Result(column="bank_id", property="bankId", jdbcType=JdbcType.INTEGER),
        @Result(column="status", property="status", jdbcType=JdbcType.INTEGER),
        @Result(column="transaction_mode", property="transactionMode", jdbcType=JdbcType.INTEGER),
        @Result(column="transaction_image", property="transactionImage", jdbcType=JdbcType.VARCHAR),
        @Result(column="create_by", property="createBy", jdbcType=JdbcType.BIGINT),
        @Result(column="create_date", property="createDate", jdbcType=JdbcType.TIMESTAMP),
        @Result(column="update_by", property="updateBy", jdbcType=JdbcType.BIGINT),
        @Result(column="update_date", property="updateDate", jdbcType=JdbcType.TIMESTAMP),
        @Result(column="remarks", property="remarks", jdbcType=JdbcType.VARCHAR),
        @Result(column="del_flag", property="delFlag", jdbcType=JdbcType.CHAR)
    })
    List<TransferDetail> selectByExampleWithRowbounds(TransferDetailExample example, RowBounds rowBounds);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table transfer_detail
     *
     * @mbg.generated Thu Jun 21 11:26:38 CST 2018
     */
    @SelectProvider(type=TransferDetailSqlProvider.class, method="selectByExample")
    @Results({
        @Result(column="id", property="id", jdbcType=JdbcType.INTEGER, id=true),
        @Result(column="user_id", property="userId", jdbcType=JdbcType.INTEGER),
        @Result(column="bankname", property="bankname", jdbcType=JdbcType.VARCHAR),
        @Result(column="remittance_time", property="remittanceTime", jdbcType=JdbcType.TIMESTAMP),
        @Result(column="deal_amount", property="dealAmount", jdbcType=JdbcType.DECIMAL),
        @Result(column="deal_bankname", property="dealBankname", jdbcType=JdbcType.VARCHAR),
        @Result(column="deal_summary", property="dealSummary", jdbcType=JdbcType.VARCHAR),
        @Result(column="money_used", property="moneyUsed", jdbcType=JdbcType.INTEGER),
        @Result(column="sap_no", property="sapNo", jdbcType=JdbcType.VARCHAR),
        @Result(column="u8_no", property="u8No", jdbcType=JdbcType.VARCHAR),
        @Result(column="user_code", property="userCode", jdbcType=JdbcType.VARCHAR),
        @Result(column="user_name", property="userName", jdbcType=JdbcType.VARCHAR),
        @Result(column="user_address", property="userAddress", jdbcType=JdbcType.VARCHAR),
        @Result(column="transaction_no", property="transactionNo", jdbcType=JdbcType.VARCHAR),
        @Result(column="remit_name", property="remitName", jdbcType=JdbcType.VARCHAR),
        @Result(column="bank_id", property="bankId", jdbcType=JdbcType.INTEGER),
        @Result(column="status", property="status", jdbcType=JdbcType.INTEGER),
        @Result(column="transaction_mode", property="transactionMode", jdbcType=JdbcType.INTEGER),
        @Result(column="transaction_image", property="transactionImage", jdbcType=JdbcType.VARCHAR),
        @Result(column="create_by", property="createBy", jdbcType=JdbcType.BIGINT),
        @Result(column="create_date", property="createDate", jdbcType=JdbcType.TIMESTAMP),
        @Result(column="update_by", property="updateBy", jdbcType=JdbcType.BIGINT),
        @Result(column="update_date", property="updateDate", jdbcType=JdbcType.TIMESTAMP),
        @Result(column="remarks", property="remarks", jdbcType=JdbcType.VARCHAR),
        @Result(column="del_flag", property="delFlag", jdbcType=JdbcType.CHAR)
    })
    List<TransferDetail> selectByExample(TransferDetailExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table transfer_detail
     *
     * @mbg.generated Thu Jun 21 11:26:38 CST 2018
     */
    @Select({
        "select",
        "id, user_id, bankname, remittance_time, deal_amount, deal_bankname, deal_summary, ",
        "money_used, sap_no, u8_no, user_code, user_name, user_address, transaction_no, ",
        "remit_name, bank_id, status, transaction_mode, transaction_image, create_by, ",
        "create_date, update_by, update_date, remarks, del_flag",
        "from transfer_detail",
        "where id = #{id,jdbcType=INTEGER}"
    })
    @Results({
        @Result(column="id", property="id", jdbcType=JdbcType.INTEGER, id=true),
        @Result(column="user_id", property="userId", jdbcType=JdbcType.INTEGER),
        @Result(column="bankname", property="bankname", jdbcType=JdbcType.VARCHAR),
        @Result(column="remittance_time", property="remittanceTime", jdbcType=JdbcType.TIMESTAMP),
        @Result(column="deal_amount", property="dealAmount", jdbcType=JdbcType.DECIMAL),
        @Result(column="deal_bankname", property="dealBankname", jdbcType=JdbcType.VARCHAR),
        @Result(column="deal_summary", property="dealSummary", jdbcType=JdbcType.VARCHAR),
        @Result(column="money_used", property="moneyUsed", jdbcType=JdbcType.INTEGER),
        @Result(column="sap_no", property="sapNo", jdbcType=JdbcType.VARCHAR),
        @Result(column="u8_no", property="u8No", jdbcType=JdbcType.VARCHAR),
        @Result(column="user_code", property="userCode", jdbcType=JdbcType.VARCHAR),
        @Result(column="user_name", property="userName", jdbcType=JdbcType.VARCHAR),
        @Result(column="user_address", property="userAddress", jdbcType=JdbcType.VARCHAR),
        @Result(column="transaction_no", property="transactionNo", jdbcType=JdbcType.VARCHAR),
        @Result(column="remit_name", property="remitName", jdbcType=JdbcType.VARCHAR),
        @Result(column="bank_id", property="bankId", jdbcType=JdbcType.INTEGER),
        @Result(column="status", property="status", jdbcType=JdbcType.INTEGER),
        @Result(column="transaction_mode", property="transactionMode", jdbcType=JdbcType.INTEGER),
        @Result(column="transaction_image", property="transactionImage", jdbcType=JdbcType.VARCHAR),
        @Result(column="create_by", property="createBy", jdbcType=JdbcType.BIGINT),
        @Result(column="create_date", property="createDate", jdbcType=JdbcType.TIMESTAMP),
        @Result(column="update_by", property="updateBy", jdbcType=JdbcType.BIGINT),
        @Result(column="update_date", property="updateDate", jdbcType=JdbcType.TIMESTAMP),
        @Result(column="remarks", property="remarks", jdbcType=JdbcType.VARCHAR),
        @Result(column="del_flag", property="delFlag", jdbcType=JdbcType.CHAR)
    })
    TransferDetail selectByPrimaryKey(Integer id);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table transfer_detail
     *
     * @mbg.generated Thu Jun 21 11:26:38 CST 2018
     */
    @UpdateProvider(type=TransferDetailSqlProvider.class, method="updateByExampleSelective")
    int updateByExampleSelective(@Param("record") TransferDetail record, @Param("example") TransferDetailExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table transfer_detail
     *
     * @mbg.generated Thu Jun 21 11:26:38 CST 2018
     */
    @UpdateProvider(type=TransferDetailSqlProvider.class, method="updateByExample")
    int updateByExample(@Param("record") TransferDetail record, @Param("example") TransferDetailExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table transfer_detail
     *
     * @mbg.generated Thu Jun 21 11:26:38 CST 2018
     */
    @UpdateProvider(type=TransferDetailSqlProvider.class, method="updateByPrimaryKeySelective")
    int updateByPrimaryKeySelective(TransferDetail record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table transfer_detail
     *
     * @mbg.generated Thu Jun 21 11:26:38 CST 2018
     */
    @Update({
        "update transfer_detail",
        "set user_id = #{userId,jdbcType=INTEGER},",
          "bankname = #{bankname,jdbcType=VARCHAR},",
          "remittance_time = #{remittanceTime,jdbcType=TIMESTAMP},",
          "deal_amount = #{dealAmount,jdbcType=DECIMAL},",
          "deal_bankname = #{dealBankname,jdbcType=VARCHAR},",
          "deal_summary = #{dealSummary,jdbcType=VARCHAR},",
          "money_used = #{moneyUsed,jdbcType=INTEGER},",
          "sap_no = #{sapNo,jdbcType=VARCHAR},",
          "u8_no = #{u8No,jdbcType=VARCHAR},",
          "user_code = #{userCode,jdbcType=VARCHAR},",
          "user_name = #{userName,jdbcType=VARCHAR},",
          "user_address = #{userAddress,jdbcType=VARCHAR},",
          "transaction_no = #{transactionNo,jdbcType=VARCHAR},",
          "remit_name = #{remitName,jdbcType=VARCHAR},",
          "bank_id = #{bankId,jdbcType=INTEGER},",
          "status = #{status,jdbcType=INTEGER},",
          "transaction_mode = #{transactionMode,jdbcType=INTEGER},",
          "transaction_image = #{transactionImage,jdbcType=VARCHAR},",
          "create_by = #{createBy,jdbcType=BIGINT},",
          "create_date = #{createDate,jdbcType=TIMESTAMP},",
          "update_by = #{updateBy,jdbcType=BIGINT},",
          "update_date = #{updateDate,jdbcType=TIMESTAMP},",
          "remarks = #{remarks,jdbcType=VARCHAR},",
          "del_flag = #{delFlag,jdbcType=CHAR}",
        "where id = #{id,jdbcType=INTEGER}"
    })
    int updateByPrimaryKey(TransferDetail record);
}